Skip to content

test: port export.test.ts + privacy.test.ts → Idris2 (4/4 files; estate port 6/11 complete)#56

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/port-export-privacy-tests
May 20, 2026
Merged

test: port export.test.ts + privacy.test.ts → Idris2 (4/4 files; estate port 6/11 complete)#56
hyperpolymath merged 1 commit into
mainfrom
feat/port-export-privacy-tests

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Completes the partial port from #55 — ubicity now has all 4 TS test files mirrored in Idris2 (18 tests total, 0 failed locally).

What's new

  • ExportTest.idr — 5/5 PASS (CSV / GeoJSON struct / DOT graph / Markdown / CSV escaping). All pure string formatting; no SUT bindings required. The Markdown test substitutes the ISO timestamp for the TS toLocaleDateString() because the TS test never asserts on the date format itself.

  • PrivacyTest.idr — 5/6 PASS (1 deferred for crypto)

    • Location fuzzing (Double rounding)
    • PII removal — substring find/replace rather than regex; preserves the TS invariants (verifies the email/phone tokens are gone + replacements present)
    • Privacy-level enforcement (Private | Anonymous | Public sum type)
    • Data minimization (record projection)
    • Shareable-dataset filter
    • Deferred: SHA-256 learner-ID anonymization — same constraint as the two CoreTest deferred cases. Idris2 base lacks crypto.
  • Main.idr — aggregates all 4 suites

  • ubicity-tests.ipkg — registers ExportTest + PrivacyTest

Local run (Idris2 0.8.0, Chez codegen)

```
=== CoreTest === 3 passed, 0 failed
=== MapperTest === 5 passed, 0 failed
=== ExportTest === 5 passed, 0 failed
=== PrivacyTest === 5 passed, 0 failed
=== Total: 18 passed, 0 failed ===
```

Estate-rollout impact

ubicity moves from "partial — 1 of 4 TS files" → "ports complete — all 4 TS files mirrored, 3 sub-cases deferred for crypto". Each deferred case is documented inline in its module with the precise constraint (crypto / JSON parse).

Process note

Originally drafted on top of feat/port-core-tests-to-idris2 (PR #55) before that merged. After #55 squash-landed I cherry-picked just the new commit onto a fresh branch off main — avoids the GitHub stacked-PR orphan trap documented in the auto-memory.

…w ported)

Completes estate port 6/11 (ubicity) from "1 of 4 files" → "4 of 4 files".

ExportTest.idr — 5/5 PASS
  CSV format / GeoJSON struct / DOT graph / Markdown / CSV escaping.
  All pure string formatting; no SUT bindings needed. The Markdown
  test substitutes the ISO timestamp for `toLocaleDateString()` since
  the TS test never asserts on the date format itself.

PrivacyTest.idr — 5/6 PASS (1 deferred for same crypto reason as
  CoreTest's anonymization case)
  Location fuzzing (Double rounding) / PII removal (string find-replace
  rather than regex — preserves the test invariants) / privacy-level
  enforcement (sum type) / data minimization (record projection) /
  shareable-dataset filter.
  Deferred: SHA-256 learner-ID anonymization (same constraint as
  CoreTest deferred cases — Idris2 base lacks crypto).

Full local run (Idris2 0.8.0, Chez codegen):
  CoreTest: 3/3, MapperTest: 5/5, ExportTest: 5/5, PrivacyTest: 5/5
  === Total: 18 passed, 0 failed ===

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 4bebda3 into main May 20, 2026
5 of 24 checks passed
@hyperpolymath hyperpolymath deleted the feat/port-export-privacy-tests branch May 20, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant